import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty } from 'class-validator';

export class LoginDto {
  @ApiProperty({ description: '用户名', required: true, default: 'data' })
  @IsNotEmpty({ message: '用户名不能为空！' })
  username: string;
  @ApiProperty({ description: '密码', required: true, default: 'hao123456' })
  @IsNotEmpty({ message: '密码不能为空！' })
  password: string;
  @ApiProperty({ description: '验证码', required: true, default: 'test' })
  @IsNotEmpty({ message: '验证码不能为空！' })
  code: string;
}
